home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000134_icon-group-sender _Wed Jun 12 13:39:41 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Wed, 12 Jun 1996 16:25:00 MST
  2. To: icon-group@cs.arizona.edu
  3. Date: Wed, 12 Jun 1996 13:39:41 -0400
  4. From: Farshad Nayeri <farshad@cmass.com>
  5. Message-Id: <31BF00DD.5535@cmass.com>
  6. Organization: Critical Mass, Inc.
  7. Sender: icon-group-request@cs.arizona.edu
  8. References: <4pa3hq$lpc@labrador.cs.purdue.edu>, <4pd03h$g3o@lectura.CS.Arizona.EDU>, <4pigls$1kq@beatty.slip.netcom.com>
  9. Subject: Re: m3 should have SWAP(a,b)
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11. Status: O
  12.  
  13. Derek Lee Beatty wrote:
  14. > dave@CS.Arizona.EDU (Dave Schaumann) wrote:
  15. > >For my part, the only time I've found 'swap' to be a useful
  16. > >operation is when I am writing sort algorithm (or sort-related algorithms,
  17. > >like heap manipulation).  Since (in my experience, anyway) this is not a
  18. > >frequent occurrance, it doesn't seem like the best idea in the world to
  19. > >include 'swap' as part of any language's basic repetoir of operations.
  20. > >
  21. > >Perhaps others have found a more extensive use for swapping?
  22. > >
  23. > I've found SWAP useful in VLSI circuit analysis.  I suspect other domains
  24. > where the natural representation is nearly a graph might be similar.
  25. > I'd expect that once you decide to include SWAP, generalizing to multiple
  26. > assignment might be worthwhile.  Perhaps after the right-hand sides are
  27. > evaluated, all the left-hand sides could be updated atomically?  (I'm just
  28. > guessing here; perhaps that would complicate the runtime unnecessarily.)
  29.  
  30. I would take Derek's point one step further:
  31.  
  32. I am yet to see a concise proposal that clearly describes the semantics of the
  33. SWAP or multiple assignment operator (especially in presense of threads.) Sure,
  34. it's not so hard to think about the syntax for it, but that's the least of the
  35. problem.
  36.  
  37. I'll even be satisfied with a syntactic mapping, e.g., the way the Modula-3 
  38. language specification maps LOCK END to TRY FINALLY END. So far, everyone 
  39. seems to have a different semantic in mind.
  40.  
  41. In fact, I propose that future syntax "wish list" proposals should at least
  42. include a syntactic mapping. Of course, they should also mention which
  43. features they are willing to cut in order to include the new proposal! (Or
  44. God forbid, state that they want to go beyond the 50 pages?!)
  45.  
  46. -- Farshad
  47.